package method;
import java.io.IOException;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.Writer;

public class UserinfoCreate {
    public void setuser(String userid,String password,String localname,String phone,String dgutid){
        String str=userid+" "+password+" "+localname+" "+phone+" "+dgutid;
        File fWrite=new File("User.txt");
        try {
            Writer out=new FileWriter(fWrite);
            BufferedWriter bufferedWrite=new BufferedWriter(out);
            bufferedWrite.write(str);
            bufferedWrite.close();
            out.close();
        }catch (IOException e){}
    }
    public void setuser(String dgutid){
        String str="20170201"+" "+"123456"+" "+"王二狗"+" "+"110"+" "+dgutid;
        File fWrite=new File("User.txt");
        try {
            Writer out=new FileWriter(fWrite);
            BufferedWriter bufferedWrite=new BufferedWriter(out);
            bufferedWrite.write(str);
            bufferedWrite.close();
            out.close();
        }catch (IOException e){}
    }
}
